package Demo5;

import java.io.File;
import java.io.IOException;

public class Xunhuanchaxun {
    public static void main(String[] args) throws IOException {
        File file = new File("f:/TEST");
        show(file);

    }
    public static void show(File file){
        if(file.isDirectory()){
            File[] files = file.listFiles();
            for (File f : files) {
               show(f);
            }
        }else {
            System.out.println(file.getAbsolutePath()+"---"+file.length());
        }
    }
}
